import request from '@/utils/request'

const basePath = '/goods/brandCategory'

// 登录接口
export const GetListData = data => {
	return request({
		url: `${basePath}/list`,
		method: 'post',
		data,
	})
}

export const AddData = data => {
	return request({
		url: `${basePath}/add`,
		method: 'post',
		data,
	})
}

export const ModifyData = data => {
	return request({
		url: `${basePath}/modify`,
		method: 'post',
		data,
	})
}

export const DeleteData = data => {
	return request({
		url: `${basePath}/delete`,
		method: 'post',
		data,
	})
}

export const GetCategoryByBrand = brandId => {
	return request({
		url: `${basePath}/category/${brandId}`,
		method: 'get',
	})
}

export const GetBrandByCategory = categoryId => {
	return request({
		url: `${basePath}/brand/${categoryId}`,
		method: 'get',
	})
}
